<template>
  <div>
    <div class="content_box">
      <div class="nav_box">
        <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" router collapse-transition @unique-opened="true" active-text-color="#FFF">
          <el-menu-item index="/index">
            <i class="el-icon-menu1"></i>
            <span slot="title">系统首页</span>
          </el-menu-item>

          <el-submenu index="">
            <template slot="title">
              <i class="el-icon-location2"></i>
              <span>商品管理</span>
            </template>
            <el-menu-item index="/shop">商品列表</el-menu-item>
            <el-menu-item index="/group">商品组</el-menu-item>
            <el-menu-item index="/classify">分类管理</el-menu-item>
            <el-menu-item index="/brand">品牌管理</el-menu-item>
            <el-menu-item index="/setUp">设置</el-menu-item>
          </el-submenu>

          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location2"></i>
              <span>订单管理</span>
            </template>
            <el-menu-item index="/order">订单概述</el-menu-item>
            <el-menu-item index="/orderIndex">订单状态</el-menu-item>
            <el-menu-item index="/activistIndex">维权管理</el-menu-item>
            <el-menu-item index="/batchSend">工具</el-menu-item>
          </el-submenu>

          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-location4"></i>
              <span>财务管理</span>
            </template>
            <el-menu-item index="/financial"> 积分明细 </el-menu-item>
            <el-menu-item index="/leaveQuota">余额明细</el-menu-item>
            <el-menu-item index="/billSupervise"> 对账单管理 </el-menu-item>
            <el-menu-item index="/fullRecord"> 充值记录 </el-menu-item>
          </el-submenu>

          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-location5"></i>
              <span>优惠管理</span>
            </template>
            <el-menu-item index="/sale">基本功能</el-menu-item>
            <el-menu-item index="/sale_Discount">优惠券管理</el-menu-item>
          </el-submenu>

          <el-submenu index="6">
            <template slot="title">
              <i class="el-icon-location5"></i>
              <span>会员管理</span>
            </template>
            <el-menu-item index="/vipList"> 会员列表 </el-menu-item>
            <el-menu-item index="/vipSummary"> 会员概述 </el-menu-item>
            <el-menu-item index="/vipGrade"> 会员等级 </el-menu-item>
            <el-menu-item index="/vipGrouping"> 分组设置 </el-menu-item>
          </el-submenu>

          <el-submenu index="7">
            <template slot="title">
              <i class="el-icon-location5"></i>
              <span>活动管理</span>
            </template>
            <el-menu-item index="/seckillAdmin">秒杀管理 </el-menu-item>
            <el-menu-item index="/doughAdmin">拼团管理</el-menu-item>
          </el-submenu>

          <el-submenu index="8">
            <template slot="title">
              <i class="el-icon-location5"></i>
              <span>积分商城</span>
            </template>
            <el-menu-item index="/integral"> 商品列表 </el-menu-item>
            <el-menu-item index="/bananerAdmin"> 轮播图管理 </el-menu-item>
            <el-menu-item index="/classifyAdmin"> 分类管理 </el-menu-item>
            <el-menu-item index="/stateAdmin"> 状态管理 </el-menu-item>
          </el-submenu>

          <el-submenu index="9">
            <template slot="title">
              <i class="el-icon-location5"></i>
              <span>权限管理</span>
            </template>
            <el-menu-item index="/storeAdmin"> 门店管理 </el-menu-item>
            <el-menu-item index="/adminAdmin"> 管理员管理 </el-menu-item>
            <el-menu-item index="/WithdrawalAudit"> 提现审核 </el-menu-item>
            <el-menu-item index="/roleAdmin"> 角色管理 </el-menu-item>
          </el-submenu>

          <el-menu-item index="/eva">
            <i class="el-icon-menu1"></i>
            <span slot="title">评价管理</span>
          </el-menu-item>

          <el-submenu index="10">
            <template slot="title">
              <i class="el-icon-location5"></i>
              <span>信息管理</span>
            </template>
            <el-menu-item index="/mess"> 意见反馈 </el-menu-item>
            <el-menu-item index="/Cooperation"> 合作申请 </el-menu-item>
            <el-menu-item index="/Questions"> 用药问答 </el-menu-item>
          </el-submenu>
        </el-menu>
      </div>
      <div style="width: 100%">
        <div class="header_title">
          <div class="header_left">
            <div class="apptop_hederright">
              <!-- 左侧 -->
              <div class="hederright_left">
                <p>{{ time }}</p>
              </div>
              <!-- 右侧 -->
              <div class="hederright_right">
                <div class="demo-types">
                  <el-avatar :size="45" src="">
                    <img src="../../assets/logo.png" />
                  </el-avatar>
                </div>
                <div>
                  <p>欢迎您!</p>
                  <p>超级管理员</p>
                </div>
                <el-dropdown>
                  <span class="el-dropdown-link">
                    <i class="el-icon-arrow-down el-icon--right"></i>
                  </span>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item command="a">退出</el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
              </div>
            </div>
          </div>
        </div>
        <router-view class="container-width"></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      time: '',
    }
  },
  created() {
    this.current()
  },
  methods: {
    handleOpen(key, keyPath) {
      // console.log(key, keyPath)
    },
    handleClose(key, keyPath) {
      // console.log(key, keyPath)
    },
    current() {
      var d = new Date(),
        str = ''
      str += d.getFullYear() + '年' //获取当前年份
      str += d.getMonth() + 1 + '月' //获取当前月份（0——11）
      str += d.getDate() + '日'
      str += d.getHours() + '时'
      str += d.getMinutes() + '分'
      str += d.getSeconds() + '秒'
      this.time = str
      return str
    },
  },
}
</script>

<style lang="scss" scoped>
@import './Home.scss';
.container-width {
  width: 1260px;
  box-sizing: border-box;
}

::v-deep .el-menu {
  background-color: #001529;
}
.header_title {
  width: 100%;
  height: 70px;
  box-shadow: 10px 3px 10px 0px #ccc;
}
.header_left {
  float: right;
  width: 200px;
  height: 100%;
}
.header_right {
  float: right;
  width: 250px;
  height: 100%;
  font-size: 16px;
  text-align: center;
  p {
    width: 100%;
    height: 40px;
    margin-top: 15px;
    line-height: 40px;
    border-right: 1px solid #000;
  }
}
.apptop_hederright {
  width: 430px;
  height: 100%;
  float: right;

  .hederright_left {
    line-height: 65px;
    width: 230px;
    height: 100%;
    float: left;

    p {
      width: 100%;
      height: 40px;
      font-size: 14px;
      color: rgba(89, 89, 89, 100);
      font-family: 方正兰亭黑-标准;
      line-height: 40px;
      display: inline-block;
      border-right: 2px solid #bbbbbb;
    }
  }
}
.hederright_right {
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
</style>
